package BackHome;

import java.util.Random;

public class BackHome {
    public static void main(String[] args) {
       //Random r = new Random();
        //int s = r.nextInt();
        long s = Math.round(Math.random()*(200)+(-100));
        System.out.println("小明身上还有 " + s + "元");
        if(s>=50){
            new Person().chooseWay(new ByTaxi());
        }else if(s<50&&s>=30){
            new Person().chooseWay(new ByTriclcle());
        }else if(s>=0&&s<30){
            new Person().chooseWay(new Walk());
        }else{
            System.out.println("还欠账，滚回家吧！");
        }
    }
}
